package com.hz.airline.dao;

import com.hz.airline.entity.FlightPlay;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

/**
 * Created by kevin on 2020/2/2 17:06
 */
public interface FlightPlayDao extends CrudRepository<FlightPlay, Integer> {

    List<FlightPlay> findAllByFlightnumberid(String flightnumberid);

    List<FlightPlay> findByFlightnumberidAndDepartdate(String flightnumberid, String departdate);

    List<FlightPlay> findAllByDepartdateAndCityAndEndcity(String departdate, String city, String endcity);

    FlightPlay findAllByDepartdateAndCityAndEndcityAndFlightnumberid(String departdate, String city, String endcity,String flightnumberid);

    List<FlightPlay> findAllByCityAndEndcityAndDepartdate(String city, String endcity, String departdate);

    List<FlightPlay> findAllByCityAndEndcityAndDepartdateAndFlightnumberid(String city, String endcity, String departdate, String flightnumberid);

    FlightPlay findAllByCityAndEndcityAndFlightnumberidAndDepartdate(String city, String endcity, String flightnumberid, String departdate);
}
